"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["packages_code-view-shared_hooks_use-repos-analytics_ts-packages_code-view-shared_hooks_use-tr-fbe81a"],{1631:(e,t,r)=>{r.d(t,{BR:()=>v,a_:()=>w,lh:()=>j});var n,o=r(74848),a=r(21728),l=r(41738),i=r(49851),s=r(38621),c=r(69726),d=r(26108),u=r(40090),m=r(34164),p=r(96540),f=r(25641),h=r(2635),y=r(33592),x=r(23967),g=r(89237),b=r(15518),_=r(26100);let v=(0,p.forwardRef)(function(e,t){let r,n,l,i,c,d,x,g,v,N,C,I=(0,a.c)(43),{reference:k,message:R,onClick:T,onRemove:A,size:P,fullWidth:z,getReferenceVersion:E}=e,F=(0,y.b)(),O=(0,h.pn)(S),M=(0,h.A3)("selectedThreadID"),D=(0,f.P)((0,h.A3)("currentTopic")),W=(0,p.useId)();if(!(0,f.vg)().has(k.type))return null;I[0]!==A?(r=e=>{A&&("Delete"===e.key||"Backspace"===e.key)&&(e.preventDefault(),A())},I[0]=A,I[1]=r):r=I[1];let B=r;I[2]!==O||I[3]!==F||I[4]!==R||I[5]!==T||I[6]!==k||I[7]!==M?(n=e=>{if(!T||(T(k,e),!e.defaultPrevented)){if(!O){if(("issue"===k.type||"pull-request"===k.type||"discussion"===k.type)&&(window.open(k.url,"_blank"),self.focus()),["file","thread-scoped-file"].includes(k.type)){let e=M?`/copilot/c/${M}`:"/copilot";e+=`?reference_id=${(0,f.Vb)(k)}`,R&&(e+=`&message_index=${R.messageIndex}`),window.open(e,"_blank");return}["repository","folder","docset","third-party","image","issue","pull-request","loop-node","github-url","job"].includes(k.type)||(e.preventDefault(),F.selectReference(k))}}},I[2]=O,I[3]=F,I[4]=R,I[5]=T,I[6]=k,I[7]=M,I[8]=n):n=I[8];let q=n,L=w(k,D);I[9]!==E||I[10]!==k?(l=E?.(k),I[9]=E,I[10]=k,I[11]=l):l=I[11];let $=l;I[12]!==k?(i=(0,f.JP)(k),I[12]=k,I[13]=i):i=I[13];let V="small"===P&&b.A.small,G=z&&b.A.fullWidth;I[14]!==V||I[15]!==G?(c=(0,m.$)(b.A.referenceToken,V,G),I[14]=V,I[15]=G,I[16]=c):c=I[16];let H=A&&W;return I[17]!==L||I[18]!==k.type?(d=L&&(0,o.jsx)(L,{size:"small",className:(0,m.$)(b.A.icon,L===s.IssueOpenedIcon&&b.A.openIcon,L===s.GitPullRequestIcon&&b.A.openIcon,L===s.IssueClosedIcon&&b.A.closedIcon,L===s.GitPullRequestClosedIcon&&b.A.pullRequestClosedIcon,L===s.GitMergeIcon&&b.A.pullRequestMergedIcon),"data-testid":"loading"===k.type?"reference-token-loading":void 0}),I[17]=L,I[18]=k.type,I[19]=d):d=I[19],I[20]!==k?(x="loading"===k.type?(0,o.jsx)("span",{className:b.A.loadingName,children:(0,o.jsx)(u.r,{"aria-hidden":"true"})}):(0,o.jsx)("span",{className:b.A.name,children:(0,f.z$)(k)}),I[20]=k,I[21]=x):x=I[21],I[22]!==k.range||I[23]!==k.type?(g="thread-scoped-snippet"===k.type&&k.range&&(0,o.jsx)("span",{className:b.A.description,children:k.range.start===k.range.end?`L${k.range.start}`:`L${k.range.start}-L${k.range.end}`}),I[22]=k.range,I[23]=k.type,I[24]=g):g=I[24],I[25]!==$?(v=void 0!==$&&(0,o.jsx)("span",{className:b.A.trailingVisual,children:(0,o.jsx)(_.g,{version:$})}),I[25]=$,I[26]=v):v=I[26],I[27]!==W||I[28]!==A||I[29]!==P?(N=A&&(0,o.jsx)(j,{size:P,onRemove:A,descriptionId:W}),I[27]=W,I[28]=A,I[29]=P,I[30]=N):N=I[30],I[31]!==q||I[32]!==B||I[33]!==t||I[34]!==x||I[35]!==g||I[36]!==v||I[37]!==N||I[38]!==i||I[39]!==c||I[40]!==H||I[41]!==d?(C=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("a",{href:i,className:c,onKeyDown:B,onClick:q,ref:t,"aria-describedby":H,children:[d,x,g,v,N]})}),I[31]=q,I[32]=B,I[33]=t,I[34]=x,I[35]=g,I[36]=v,I[37]=N,I[38]=i,I[39]=c,I[40]=H,I[41]=d,I[42]=C):C=I[42],C});function w(e,t){switch(e.type){case"figma":return I;case"file":return s.FileIcon;case"folder":return s.FileDirectoryFillIcon;case"file-diff":return s.FileDiffIcon;case"snippet":return t&&"languageName"in e&&e.languageName&&x.Yr.has(e.languageName)?s.BookIcon:s.CodeIcon;case"repository":return s.RepoIcon;case"symbol":return s.CodeSquareIcon;case"docset":return s.BookIcon;case"commit":return s.GitCommitIcon;case"pull-request":if("pull-request"===e.type){if(e.draft&&"open"===e.state)return s.GitPullRequestDraftIcon;switch(e.state){case"open":default:return s.GitPullRequestIcon;case"closed":return s.GitPullRequestClosedIcon;case"merged":return s.GitMergeIcon}}return;case"repo-instructions":case"org-instructions":return s.NoteIcon;case"issue":if("issue"===e.type)switch(e.state){case"open":default:return s.IssueOpenedIcon;case"closed":return s.IssueClosedIcon;case"not_planned":return s.SkipIcon}return;case"draft-issue":case"draft-update-issue":return s.IssueDraftIcon;case"discussion":return s.CommentDiscussionIcon;case"web-search-result":if("web-search-result"===e.type)if("bing_search"===e.reference_type)return l._;else return s.GlobeIcon;return;case"thread-scoped-file":case"thread-scoped-snippet":return"language"in e&&x.Yr.has(e.language)?s.MarkdownIcon:s.CodeIcon;case"loop-node":return k;case"loop-execution":return N;case"loading":return c.A;case"copilot-space":return s.SpaceIcon;case"github-url":return s.LinkIcon;case"job":return()=>C(e);default:return}}function N(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("div",{className:b.A.loopsIconOuter,children:(0,o.jsx)(i.LP,{className:b.A.loopsIcon})}),t[0]=e):e=t[0],e}function C(e){let t=(0,a.c)(2);if(e.jobFailed){let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("span",{className:b.A.jobIconOuter,style:{color:"var(--bgColor-danger-emphasis, var(--color-scale-red-4))"},children:(0,o.jsx)(s.XCircleFillIcon,{})}),t[0]=e):e=t[0],e}{let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("span",{className:b.A.jobIconOuter,children:(0,o.jsx)(s.PlayIcon,{})}),t[1]=e):e=t[1],e}}function I(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("div",{className:b.A.figmaIconOuter,children:(0,o.jsx)(g._,{className:b.A.figmaIcon})}),t[0]=e):e=t[0],e}function k(){let e,t=(0,a.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("div",{className:b.A.nodeIconOuter,children:(0,o.jsx)(i.GS,{size:16})}),t[0]=e):e=t[0],e}let j=e=>{let t,r,n,l,i=(0,a.c)(12),{size:c,onRemove:u,descriptionId:m,onMouseOver:p,onMouseLeave:f}=e;return i[0]!==u?(t=e=>{e.stopPropagation(),e.preventDefault(),u()},i[0]=u,i[1]=t):t=i[1],i[2]!==f||i[3]!==p||i[4]!==c||i[5]!==t?(r=(0,o.jsx)(d.K,{tabIndex:-1,"aria-hidden":!0,size:c,icon:s.XIcon,"aria-label":"Remove",onClick:t,tooltipDirection:"n",variant:"invisible",className:b.A.removeButton,onMouseOver:p,onMouseLeave:f}),i[2]=f,i[3]=p,i[4]=c,i[5]=t,i[6]=r):r=i[6],i[7]!==m?(n=(0,o.jsx)("span",{hidden:!0,id:m,children:"press backspace or delete to remove"}),i[7]=m,i[8]=n):n=i[8],i[9]!==r||i[10]!==n?(l=(0,o.jsxs)(o.Fragment,{children:[r,n]}),i[9]=r,i[10]=n,i[11]=l):l=i[11],l};try{v.displayName||(v.displayName="ReferenceToken")}catch{}try{(n=Icon).displayName||(n.displayName="Icon")}catch{}try{N.displayName||(N.displayName="LoopReferenceIcon")}catch{}try{C.displayName||(C.displayName="StylizedJobIcon")}catch{}try{I.displayName||(I.displayName="StylizedFigmaIcon")}catch{}try{k.displayName||(k.displayName="StylizedNodeIcon")}catch{}try{j.displayName||(j.displayName="RemoveReferenceTokenButton")}catch{}function S(e){return"immersive"===e.mode}},6665:(e,t,r)=>{r.d(t,{T:()=>d});var n=r(78314),o=r(25407),a=r(91747),l=r(30459),i=r(96379),s=r(96540),c=r(35898);function d(){let{sendAnalyticsEvent:e}=(0,l.s)(),t=function(){let e=function(){let e=(0,n.t)(),t=(0,c.i)();return(0,s.useMemo)(()=>({react_app:"code-view",repository_id:e.id,repository_nwo:`${e.ownerLogin}/${e.name}`,repository_public:e.public,repository_is_fork:e.isFork,actor_id:t?.id,actor_login:t?.login}),[e,t])}(),t=(0,n.t)(),r=(0,o.yH8)(o.tTz,{owner:t.ownerLogin,repo:t.name});return(0,s.useCallback)((t,n,o)=>{let a={target:t,interaction:n,context:o,...e,...{url:window.location.href,user_agent:window.navigator.userAgent,browser_width:window.innerWidth,browser_languages:window.navigator.languages.join(",")}};(0,i.lS)(r,{method:"POST",body:a})},[e,r])}(),r=(0,a.u)("code_nav_ui_events");return{sendRepoClickEvent:(0,s.useCallback)((n,o={})=>{e("repository.click",n,o),r&&t(n,"click",o)},[e,t,r]),sendRepoKeyDownEvent:(0,s.useCallback)((n,o={})=>{e("repository.keydown",n,o),r&&t(n,"keydown",o)},[e,t,r]),sendStats:(0,s.useCallback)((n,o={})=>{e(n,"",o),r&&t(n,"stats",o)},[e,t,r]),sendMarketplaceActionEvent:(0,s.useCallback)((t,r={})=>{e("marketplace.action.click",t,r)},[e])}}},7808:(e,t,r)=>{r.d(t,{z:()=>WebWorker});var n=r(35750),o=r(18150),a=r(85242),l=r(50467);let WebWorker=class WebWorker{set onmessage(e){this.worker.onmessage=e}postMessage(e){this.worker.postMessage(e)}terminate(){this.worker.terminate()}constructor(e,t){(0,l._)(this,"worker",void 0);try{this.worker=new Worker(`${e}?module=true`,{type:"module"})}catch{console.warn("Web workers are not available. Please enable web workers to benefit from the improved performance."),this.worker=new MainThreadWorker(t)}}};var i=new WeakMap,s=new WeakMap;let MainThreadWorker=class MainThreadWorker{async postMessage(e){if((0,n._)(this,i))return;let t={data:(0,n._)(this,s).call(this,{data:e})};this.onmessage?.(t)}terminate(){(0,a._)(this,i,!0)}constructor(e){(0,o._)(this,i,{writable:!0,value:!1}),(0,l._)(this,"onmessage",void 0),(0,o._)(this,s,{writable:!0,value:void 0}),(0,a._)(this,s,e)}}},15518:(e,t,r)=>{r.d(t,{A:()=>n});let n={referenceToken:"ReferenceToken-module__referenceToken--WsIyo",small:"ReferenceToken-module__small--JKhUS",fullWidth:"ReferenceToken-module__fullWidth--b7qQo",loadingName:"ReferenceToken-module__loadingName--tXmXP",name:"ReferenceToken-module__name--nPIg4",description:"ReferenceToken-module__description--Md3k_",trailingVisual:"ReferenceToken-module__trailingVisual--X22Ay",removeButton:"ReferenceToken-module__removeButton--BwDIm",icon:"ReferenceToken-module__icon--YHCrp",openIcon:"ReferenceToken-module__openIcon--SCaYN",closedIcon:"ReferenceToken-module__closedIcon--McXYG",pullRequestClosedIcon:"ReferenceToken-module__pullRequestClosedIcon--qLOQA",pullRequestMergedIcon:"ReferenceToken-module__pullRequestMergedIcon--yvGds",figmaIconOuter:"ReferenceToken-module__figmaIconOuter--sVqOV",figmaIcon:"ReferenceToken-module__figmaIcon--lsVAI",loopsIconOuter:"ReferenceToken-module__loopsIconOuter--Ydf4W",loopsIcon:"ReferenceToken-module__loopsIcon--mA94T",nodeIconOuter:"ReferenceToken-module__nodeIconOuter--ooSEn",jobIconOuter:"ReferenceToken-module__jobIconOuter--EyGdP"}},19189:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(53552),o=r(78314),a=r(25407),l=r(54571),i=r(96540);function s(){let e=(0,o.t)(),{path:t,action:r,refInfo:s}=(0,n.eu)(),[c]=(0,l.I)(()=>!1,!0,[]);function d(e){return e?`?${e}`:""}function u(e){return c?"":void 0===e?window.location.hash:e?`#${e}`:""}return{getItemUrl:i.useCallback(t=>(0,a.IO9)({repo:e,commitish:s.name,action:"directory"===t.contentType?"tree":"blob",path:t.path}),[e.ownerLogin,e.name,s.name]),getUrl(n={}){let o=(0,a.IO9)({repo:e,commitish:n.commitish||s.name,action:n.action||r,path:n.path||t})+function({params:e,hash:t}){return d(e)+u(t)}(n);return n.absolute?new URL(o,window.location.origin).href:o},createPermalink(n={}){let o=(0,a.IO9)({repo:e,commitish:s.currentOid,action:n.action||r,path:n.path||t})+function({params:e,hash:t}){return d(e)+u(t)}(n);return n.absolute?new URL(o,window.location.origin).href:o},isCurrentPagePermalink:()=>!c&&s.name===s.currentOid&&window.location.pathname.includes(s.currentOid)}}},25556:(e,t,r)=>{r.d(t,{m:()=>h});var n=r(74848),o=r(11683),a=r(96540),l=r(56149),i=r(87448),s=r(34164);let c=r(38267).Ay.span.withConfig({displayName:"ControlledTooltip__TooltipBase",componentId:"sc-a45d872d-0"})(["&::after{position:absolute;z-index:1000000;display:none;padding:0.5em 0.75em;font:normal normal 11px/1.5 ",";-webkit-font-smoothing:subpixel-antialiased;color:",";text-align:center;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-wrap:break-word;white-space:pre;pointer-events:none;content:attr(data-visible-text);background:",";border-radius:",";opacity:0;}@keyframes tooltip-appear{from{opacity:0;}to{opacity:1;}}&.tooltipped-open,&:hover,&:active,&:focus{&::after{display:inline-block;text-decoration:none;animation-name:tooltip-appear;animation-duration:0.1s;animation-fill-mode:forwards;animation-timing-function:ease-in;animation-delay:0s;}}&.tooltipped-no-delay.tooltipped-open,&.tooltipped-no-delay:hover,&.tooltipped-no-delay:active,&.tooltipped-no-delay:focus{&::after{animation-delay:0s;}}&.tooltipped-s,&.tooltipped-se,&.tooltipped-sw{&::after{top:100%;right:50%;margin-top:6px;}}&.tooltipped-se{&::after{right:auto;left:50%;margin-left:-",";}}&.tooltipped-sw::after{margin-right:-",";}&.tooltipped-n,&.tooltipped-ne,&.tooltipped-nw{&::after{right:50%;bottom:100%;margin-bottom:6px;}}&.tooltipped-ne{&::after{right:auto;left:50%;margin-left:-",";}}&.tooltipped-nw::after{margin-right:-",";}&.tooltipped-s::after,&.tooltipped-n::after{transform:translateX(50%);}&.tooltipped-w{&::after{right:100%;bottom:50%;margin-right:6px;transform:translateY(50%);}}&.tooltipped-e{&::after{bottom:50%;left:100%;margin-left:6px;transform:translateY(50%);}}&.tooltipped-align-right-2::after{right:0;margin-right:0;}&.tooltipped-align-left-2::after{left:0;margin-left:0;}",";"],(0,i.yB)("fonts.normal"),(0,i.yB)("colors.fg.onEmphasis"),(0,i.yB)("colors.neutral.emphasisPlus"),(0,i.yB)("radii.2"),(0,i.yB)("space.3"),(0,i.yB)("space.3"),(0,i.yB)("space.3"),(0,i.yB)("space.3"),i.sx),d=()=>()=>void 0,u=()=>!1,m=()=>!0,p=(0,a.forwardRef)(function({direction:e="n",className:t,text:r,noDelay:o,align:i,wrap:p,open:f=!1,portalProps:h={},...y},x){let g=(0,a.useSyncExternalStore)(d,m,u),b=(0,s.$)(t,`tooltipped-${e}`,i&&`tooltipped-align-${i}-2`,o&&"tooltipped-no-delay",p&&"tooltipped-multiline",f&&"tooltipped-open");return g?(0,n.jsx)(l.ZL,{...h,children:(0,n.jsx)(c,{ref:x,role:"tooltip","aria-label":r,"data-visible-text":r||y["aria-label"],...y,sx:{position:"fixed",zIndex:1,...y.sx},className:b})}):null});try{p.displayName||(p.displayName="ControlledTooltip")}catch{}var f=r(65787);let h=(0,a.forwardRef)(function({contentRef:e,open:t,anchoredPositionAlignment:r,anchorSide:l,anchorOffset:i,alignmentOffset:s,allowOutOfBounds:c,...d},u){let m=(0,a.useRef)(null);(0,a.useImperativeHandle)(u,()=>m.current);let h=(0,a.useRef)({left:0,top:0}),y=(0,a.useSyncExternalStore)((0,a.useCallback)(r=>{if(!m.current||!e.current||!t)return()=>void 0;let n=(0,f.U)(e.current);return n?.addEventListener("scroll",r),()=>{n?.removeEventListener("scroll",r)}},[e,t]),(0,a.useCallback)(()=>{if(!m.current||!e.current)return h.current;let t=(0,o.uG)(m.current,e.current,{align:r??"center",side:l??"outside-top",alignmentOffset:s??0,anchorOffset:i??0,allowOutOfBounds:c});return(t.left!==h.current.left||t.top!==h.current.top)&&(h.current=t),h.current},[e,s,i,r,l,c]),(0,a.useCallback)(()=>h.current,[]));return(0,n.jsx)(p,{...d,ref:m,open:t,style:{position:"absolute",...y,...d.style}})});try{h.displayName||(h.displayName="PortalTooltip")}catch{}},26100:(e,t,r)=>{r.d(t,{g:()=>i});var n=r(74848),o=r(21728),a=r(72579);let l={version:"VersionName-module__version--FC1cb"};function i(e){let t,r=(0,o.c)(3),{"data-testid":i,version:s}=e;return r[0]!==i||r[1]!==s?(t=(0,n.jsxs)(a.A,{className:l.version,as:"span","data-testid":i,children:["v",s]}),r[0]=i,r[1]=s,r[2]=t):t=r[2],t}try{i.displayName||(i.displayName="VersionName")}catch{}},31078:(e,t,r)=>{r.d(t,{Ck:()=>i,JS:()=>l});var n=r(74848),o=r(96540);let a=(0,o.createContext)({query:"",setQuery:()=>void 0});function l(){return(0,o.useContext)(a)}function i({children:e}){let[t,r]=(0,o.useState)(""),l=(0,o.useMemo)(()=>({query:t,setQuery:r}),[r,t]);return(0,n.jsx)(a.Provider,{value:l,children:e})}try{a.displayName||(a.displayName="FileQueryContext")}catch{}try{i.displayName||(i.displayName="FileQueryProvider")}catch{}},34535:(e,t,r)=>{r.d(t,{Z:()=>o});var n=r(96540);function o({focusRowRef:e,mouseRowRef:t}){let[r,o]=n.useState(!1);return n.useEffect(()=>{if(e.current&&t.current){let r=()=>{let t=e.current?.querySelector(".PRIVATE_TreeView-item-content-text");t?.scrollWidth!==t?.offsetWidth&&o(!0)};e.current.onfocus=()=>{r()},e.current.onblur=()=>{o(!1)},t.current.onmouseenter=()=>{r()},t.current.onmouseleave=()=>{o(!1)}}},[e,t]),r}},35898:(e,t,r)=>{r.d(t,{Q:()=>i,i:()=>s});var n=r(74848),o=r(21728),a=r(96540);let l=a.createContext(void 0);function i(e){let t,r=(0,o.c)(3),{user:a,children:i}=e;return r[0]!==i||r[1]!==a?(t=(0,n.jsxs)(l.Provider,{value:a,children:[" ",i," "]}),r[0]=i,r[1]=a,r[2]=t):t=r[2],t}function s(){return a.useContext(l)}try{l.displayName||(l.displayName="CurrentUserContext")}catch{}try{i.displayName||(i.displayName="CurrentUserProvider")}catch{}},37178:(e,t,r)=>{r.d(t,{O:()=>w});var n=r(74848),o=r(21728),a=r(38621),l=r(5524),i=r(87448),s=r(10436),c=r(96540);function d(e){let t,r,a,l,s=(0,o.c)(5),{children:c}=e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t={overflow:"auto",maxHeight:"calc(100dvh - 64px - 52px)"},s[0]=t):t=s[0],s[1]===Symbol.for("react.memo_cache_sentinel")?(r={overflow:"hidden",backgroundColor:"canvas.default"},s[1]=r):r=s[1],s[2]===Symbol.for("react.memo_cache_sentinel")?(a={display:"flex",flexDirection:"column"},s[2]=a):a=s[2],s[3]!==c?(l=(0,n.jsx)(i.az,{sx:t,children:(0,n.jsx)(i.az,{sx:r,children:(0,n.jsx)(i.az,{sx:a,children:c})})}),s[3]=c,s[4]=l):l=s[4],l}function u(e){let t,r,l,s,c,d=(0,o.c)(9),{children:u,onDismiss:m}=e;return d[0]===Symbol.for("react.memo_cache_sentinel")?(t={display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"16px",fontSize:1},d[0]=t):t=d[0],d[1]===Symbol.for("react.memo_cache_sentinel")?(r={display:"flex",flexDirection:"row",alignItems:"center",minWidth:0,"@media screen and (max-width: 768px)":{maxWidth:"80%"}},d[1]=r):r=d[1],d[2]!==u?(l=(0,n.jsx)(i.az,{sx:r,children:u}),d[2]=u,d[3]=l):l=d[3],d[4]!==m?(s=m&&(0,n.jsx)(i.K0,{unsafeDisableTooltip:!0,"aria-label":"Dismiss",icon:a.XIcon,onClick:m,variant:"invisible",sx:{flexShrink:0}}),d[4]=m,d[5]=s):s=d[5],d[6]!==l||d[7]!==s?(c=(0,n.jsxs)(i.DZ,{as:"h3",sx:t,children:[l,s]}),d[6]=l,d[7]=s,d[8]=c):c=d[8],c}function m(e){let t,r,a=(0,o.c)(3),{children:l}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t={borderBottom:"1px solid var(--borderColor-default, var(--color-border-default))",borderTop:"1px solid var(--borderColor-default, var(--color-border-default))",backgroundColor:"canvas.subtle",px:3,py:2},a[0]=t):t=a[0],a[1]!==l?(r=(0,n.jsx)(i.az,{sx:t,children:l}),a[1]=l,a[2]=r):r=a[2],r}function p(e){let t,r,l,d,u,m,p=(0,o.c)(11),{children:h,title:y,initiallyOpen:x}=e,[g,b]=(0,c.useState)(x??!1);p[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>b(f),p[0]=t):t=p[0],p[1]===Symbol.for("react.memo_cache_sentinel")?(r={borderRadius:0,backgroundColor:"canvas.default",border:"none",borderBottom:"1px solid var(--borderColor-default, var(--color-border-default))",'[data-component="buttonContent"]':{justifyContent:"start"}},p[1]=r):r=p[1];let _=g?a.ChevronDownIcon:a.ChevronRightIcon;p[2]===Symbol.for("react.memo_cache_sentinel")?(l={mr:2},p[2]=l):l=p[2],p[3]!==_?(d=(0,n.jsx)(s.m4,{icon:_,sx:l}),p[3]=_,p[4]=d):d=p[4],p[5]!==d||p[6]!==y?(u=(0,n.jsxs)(i.$n,{onClick:t,sx:r,children:[d,y]}),p[5]=d,p[6]=y,p[7]=u):u=p[7];let v=g&&h;return p[8]!==u||p[9]!==v?(m=(0,n.jsxs)(n.Fragment,{children:[u,v]}),p[8]=u,p[9]=v,p[10]=m):m=p[10],m}function f(e){return!e}function h(e){let t,r,a=(0,o.c)(3),{children:l}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t={padding:3},a[0]=t):t=a[0],a[1]!==l?(r=(0,n.jsx)(i.az,{sx:t,children:l}),a[1]=l,a[2]=r):r=a[2],r}function y(e){let t,r,l,c,d,u,m,p=(0,o.c)(14),{direction:f,onExpand:h}=e;p[0]===Symbol.for("react.memo_cache_sentinel")?(t={justifyContent:"start"},p[0]=t):t=p[0],p[1]!==f?(r={borderRadius:0,backgroundColor:"canvas.default",border:"none",px:3,py:2,width:"100%",fontSize:0,fontWeight:"normal",color:"fg.muted",'[data-component="buttonContent"]':t,..."above"===f?{borderBottom:"1px solid var(--borderColor-default, var(--color-border-default))"}:{borderTop:"1px solid var(--borderColor-default, var(--color-border-default))"}},p[1]=f,p[2]=r):r=p[2],p[3]===Symbol.for("react.memo_cache_sentinel")?(l={display:"flex",alignItems:"center"},p[3]=l):l=p[3];let y="below"===f?a.FoldDownIcon:a.FoldUpIcon;return p[4]===Symbol.for("react.memo_cache_sentinel")?(c={mr:2},p[4]=c):c=p[4],p[5]!==y?(d=(0,n.jsx)(s.m4,{icon:y,sx:c}),p[5]=y,p[6]=d):d=p[6],p[7]!==f||p[8]!==d?(u=(0,n.jsxs)(i.az,{sx:l,children:[d,"Show content ",f]}),p[7]=f,p[8]=d,p[9]=u):u=p[9],p[10]!==h||p[11]!==r||p[12]!==u?(m=(0,n.jsx)(i.$n,{onClick:h,sx:r,children:u}),p[10]=h,p[11]=r,p[12]=u,p[13]=m):m=p[13],m}function x(e){let t,r,a=(0,o.c)(3),{children:i}=e;return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(l.l.GroupHeading,{as:"h3",children:"Reference details"}),a[0]=t):t=a[0],a[1]!==i?(r=(0,n.jsx)(l.l,{children:(0,n.jsxs)(l.l.Group,{children:[t,i]})}),a[1]=i,a[2]=r):r=a[2],r}function g(e){let t,r,a=(0,o.c)(6),{children:i,href:c,icon:d}=e;return a[0]!==d?(t=(0,n.jsx)(l.l.LeadingVisual,{children:(0,n.jsx)(s.m4,{icon:d})}),a[0]=d,a[1]=t):t=a[1],a[2]!==i||a[3]!==c||a[4]!==t?(r=(0,n.jsxs)(l.l.LinkItem,{href:c,children:[t,i]}),a[2]=i,a[3]=c,a[4]=t,a[5]=r):r=a[5],r}function b(){let e,t,r=(0,o.c)(2);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",flexDirection:"column",alignItems:"center",m:"auto",p:3},r[0]=e):e=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsxs)(i.az,{sx:e,children:[(0,n.jsx)(i.y$,{sx:{mb:2}}),(0,n.jsx)("div",{children:"Loading..."})]}),r[1]=t):t=r[1],t}function _(){let e,t,r=(0,o.c)(2);return r[0]===Symbol.for("react.memo_cache_sentinel")?(e={display:"flex",justifyContent:"center",p:3},r[0]=e):e=r[0],r[1]===Symbol.for("react.memo_cache_sentinel")?(t=(0,n.jsx)(i.az,{sx:e,children:(0,n.jsx)(i.az,{sx:{color:"danger.fg",fontWeight:"bold"},children:"Failed to load reference details"})}),r[1]=t):t=r[1],t}function v(e){let t,r=(0,o.c)(4),{children:a,detailsError:l,detailsLoading:i}=e;return r[0]!==a||r[1]!==l||r[2]!==i?(t=l?(0,n.jsx)(_,{}):i?(0,n.jsx)(b,{}):(0,n.jsx)(n.Fragment,{children:a}),r[0]=a,r[1]=l,r[2]=i,r[3]=t):t=r[3],t}let w={Frame:d,Header:u,Body:v,Content:h,CollapsibleSubsection:p,ContentExpander:y,Details:x,DetailLink:g,SectionDivider:m};try{d.displayName||(d.displayName="Frame")}catch{}try{u.displayName||(u.displayName="Header")}catch{}try{m.displayName||(m.displayName="SectionDivider")}catch{}try{p.displayName||(p.displayName="CollapsibleSubsection")}catch{}try{h.displayName||(h.displayName="Content")}catch{}try{y.displayName||(y.displayName="ContentExpander")}catch{}try{x.displayName||(x.displayName="Details")}catch{}try{g.displayName||(g.displayName="DetailLink")}catch{}try{b.displayName||(b.displayName="Loading")}catch{}try{_.displayName||(_.displayName="Error")}catch{}try{v.displayName||(v.displayName="Body")}catch{}},37272:(e,t,r)=>{r.d(t,{E:()=>a});var n=r(74848),o=r(64375);function a({children:e}){return(0,o.P)()?(0,n.jsx)(n.Fragment,{children:e}):null}try{a.displayName||(a.displayName="AllShortcutsEnabled")}catch{}},41738:(e,t,r)=>{r.d(t,{_:()=>d,I:()=>s});var n=r(74848),o=r(21728),a=r(87448),l=r(37178);let i={"bing-icon":"WebSearchReferencePreview-module__bing-icon--lhPED"};function s(e){let t,r,i,s,u,m,p,f,h,y,x,g=(0,o.c)(19),{reference:b,onDismiss:_}=e;g[0]===Symbol.for("react.memo_cache_sentinel")?(t={textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:2},r=(0,n.jsx)(d,{}),g[0]=t,g[1]=r):(t=g[0],r=g[1]),g[2]===Symbol.for("react.memo_cache_sentinel")?(i={fontSize:0,fontWeight:400,color:"fg.muted"},g[2]=i):i=g[2],g[3]===Symbol.for("react.memo_cache_sentinel")?(s={fontSize:1,fontWeight:600,color:"fg.default"},g[3]=s):s=g[3];let v=1===b.results.length?" result ":" results ";return g[4]!==b.results.length||g[5]!==v?(u=(0,n.jsxs)(a.az,{sx:t,children:[r,(0,n.jsxs)(a.EY,{sx:i,children:[(0,n.jsxs)(a.EY,{sx:s,children:[b.results.length," ",v]}),"from Bing search."]})]}),g[4]=b.results.length,g[5]=v,g[6]=u):u=g[6],g[7]!==_||g[8]!==u?(m=(0,n.jsx)(l.O.Header,{onDismiss:_,children:u}),g[7]=_,g[8]=u,g[9]=m):m=g[9],g[10]===Symbol.for("react.memo_cache_sentinel")?(p={display:"flex",flexDirection:"column",px:3,gap:3,pb:3},g[10]=p):p=g[10],g[11]!==b.results?(f=b.results.map(c),g[11]=b.results,g[12]=f):f=g[12],g[13]===Symbol.for("react.memo_cache_sentinel")?(h=(0,n.jsx)(a.EY,{sx:{fontSize:0,fontWeight:400},children:(0,n.jsx)(a.N_,{href:"https://privacy.microsoft.com/en-us/privacystatement",rel:"nofollow",target:"_blank",children:"Microsoft Privacy Statement"})}),g[13]=h):h=g[13],g[14]!==f?(y=(0,n.jsx)(l.O.Body,{detailsError:!1,detailsLoading:!1,children:(0,n.jsxs)(a.az,{sx:p,children:[f,h]})}),g[14]=f,g[15]=y):y=g[15],g[16]!==y||g[17]!==m?(x=(0,n.jsxs)(l.O.Frame,{children:[m,y]}),g[16]=y,g[17]=m,g[18]=x):x=g[18],x}function c(e,t){return(0,n.jsxs)(a.az,{sx:{display:"flex",flexDirection:"column",gap:1,border:"1px solid var(--borderColor-default, var(--color-border-default))",borderRadius:"6px",padding:3},children:[(0,n.jsx)(a.N_,{sx:{fontWeight:600,fontSize:2},href:e.url,rel:"nofollow",children:e.title}),(0,n.jsx)("div",{children:e.excerpt}),(0,n.jsx)(a.az,{sx:{fontSize:0,color:"fg.muted"},children:e.url})]},t)}let d=()=>{let e,t=(0,o.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,n.jsx)("div",{className:i["bing-icon"]}),t[0]=e):e=t[0],e};try{s.displayName||(s.displayName="WebSearchReferencePreview")}catch{}try{d.displayName||(d.displayName="BingIcon")}catch{}},42255:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(70263),o=r(96540);let a=function(e){let t=(0,n.A)(),[r,a]=(0,o.useState)(e);return[r,(0,o.useCallback)(e=>{t()&&a(e)},[t])]}},43258:(e,t,r)=>{r.d(t,{Qn:()=>s,T8:()=>d,Y6:()=>m,k6:()=>u});var n=r(74848),o=r(52870),a=r(96540),l=r(73189),i=r(42255);let s=5e3,c=(0,a.createContext)({addToast:l.l,addPersistedToast:l.l,clearPersistedToast:l.l}),d=(0,a.createContext)({toasts:[],persistedToast:null});function u({children:e}){let[t,r]=(0,i.A)([]),[l,u]=(0,a.useState)(null),{safeSetTimeout:m}=(0,o.A)(),p=(0,a.useCallback)(function(e){r([...t,e]),m(()=>r(t.slice(1)),s)},[t,m,r]),f=(0,a.useCallback)(function(e){u(e)},[u]),h=(0,a.useCallback)(function(){u(null)},[u]),y=(0,a.useMemo)(()=>({addToast:p,addPersistedToast:f,clearPersistedToast:h}),[f,p,h]),x=(0,a.useMemo)(()=>({toasts:t,persistedToast:l}),[t,l]);return(0,n.jsx)(c.Provider,{value:y,children:(0,n.jsx)(d.Provider,{value:x,children:e})})}function m(){return(0,a.useContext)(c)}try{c.displayName||(c.displayName="ToastContext")}catch{}try{d.displayName||(d.displayName="InternalToastsContext")}catch{}try{u.displayName||(u.displayName="ToastContextProvider")}catch{}},53552:(e,t,r)=>{r.d(t,{eu:()=>s,qV:()=>i,sq:()=>c});var n=r(74848),o=r(79634),a=r(96540);let l=a.createContext({});function i({children:e,...t}){return(0,n.jsx)(l.Provider,{value:t,children:e})}function s(){return a.useContext(l)}function c(){return(0,o.X)()}try{l.displayName||(l.displayName="FilesPageInfoContext")}catch{}try{i.displayName||(i.displayName="FilesPageInfoProvider")}catch{}},54030:(e,t,r)=>{r.d(t,{o:()=>u});var n=r(5225),o=r(78314),a=r(25407),l=r(96379),i=r(96540);async function s(e){let t=await (0,l.lS)(e);return t.ok?await t.json():void 0}let c=new Map,d=(0,n.A)(s,{cache:c});function u(e,t,r){let n=(0,o.t)(),[l,s]=(0,i.useState)({list:[],directories:[],loading:!0}),c=(0,a.ClY)({repo:n,commitOid:e,includeDirectories:!r});return(0,i.useEffect)(()=>{let e=!1,r=async()=>{s({list:[],directories:[],loading:!0});let t=await d(c);if(e)return;let r=t?.paths||[],n=t?.directories||[];s({list:r.concat(n).sort(),directories:n,error:!t})};return t&&r(),function(){e=!0}},[c,t,r]),l}},64375:(e,t,r)=>{r.d(t,{$:()=>l,P:()=>i});var n=r(74848),o=r(96540);let a=o.createContext(!0);function l({allShortcutsEnabled:e,children:t}){return(0,n.jsxs)(a.Provider,{value:e,children:[" ",t," "]})}function i(){return o.useContext(a)}try{a.displayName||(a.displayName="AllShortcutsEnabledContext")}catch{}try{l.displayName||(l.displayName="AllShortcutsEnabledProvider")}catch{}},64642:(e,t,r)=>{r.d(t,{j:()=>l});var n=r(5225),o=r(91385);let a=(0,n.A)(o.fN);function l({data:e}){let{query:t,baseList:r,startTime:n}=e,l=t.replaceAll("\\","");return{query:t,list:r.filter(e=>{var t,r;return t=e,""===(r=l)||(0,o.qA)(r,t)&&a(r,t)>0}).sort((e,t)=>a(l,t)-a(l,e)),baseCount:r.length,startTime:n}}},65787:(e,t,r)=>{r.d(t,{U:()=>a});let n=e=>{let t=getComputedStyle(e,null);return["overflow","overflow-y","overflow-x"].some(e=>{let r=t.getPropertyValue(e);return"auto"===r||"scroll"===r})},o=(e,t)=>e&&null!==e.parentNode?o(e.parentNode,t.concat([e])):t;function a(e){if(e instanceof HTMLElement||e instanceof SVGElement){for(let t of o(e.parentNode,[]))if((t instanceof HTMLElement||t instanceof SVGElement)&&n(t))return t;return document.scrollingElement||document.documentElement}}},70263:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(88431),o=r(96540);function a(){let e=(0,o.useRef)(!1),t=(0,o.useCallback)(()=>e.current,[]);return(0,n.N)(()=>(e.current=!0,()=>{e.current=!1}),[]),t}},78314:(e,t,r)=>{r.d(t,{d:()=>i,t:()=>s});var n=r(74848),o=r(21728),a=r(96540);let l=a.createContext({});function i(e){let t,r=(0,o.c)(3),{repository:a,children:i}=e;return r[0]!==i||r[1]!==a?(t=(0,n.jsxs)(l.Provider,{value:a,children:[" ",i," "]}),r[0]=i,r[1]=a,r[2]=t):t=r[2],t}function s(){return a.useContext(l)}try{l.displayName||(l.displayName="CurrentRepositoryContext")}catch{}try{i.displayName||(i.displayName="CurrentRepositoryProvider")}catch{}},89237:(e,t,r)=>{r.d(t,{_:()=>a});var n=r(74848),o=r(21728);function a(e){let t,r,a,l,i,s=(0,o.c)(8);return s[0]!==e?({className:t,...r}=e,s[0]=e,s[1]=t,s[2]=r):(t=s[1],r=s[2]),s[3]===Symbol.for("react.memo_cache_sentinel")?(a=(0,n.jsxs)("g",{clipPath:"url(#clip0_216_3161)",children:[(0,n.jsx)("path",{d:"M7.99837 7.99967C7.99837 6.52683 9.1922 5.33301 10.665 5.33301C12.1379 5.33301 13.3317 6.52683 13.3317 7.99967C13.3317 9.47252 12.1379 10.6663 10.665 10.6663C9.1922 10.6663 7.99837 9.47252 7.99837 7.99967Z",fill:"#1ABCFE"}),(0,n.jsx)("path",{d:"M2.66504 13.3337C2.66504 11.8608 3.85886 10.667 5.33171 10.667H7.99837V13.3337C7.99837 14.8065 6.80455 16.0003 5.33171 16.0003C3.85886 16.0003 2.66504 14.8065 2.66504 13.3337Z",fill:"#0ACF83"}),(0,n.jsx)("path",{d:"M7.99837 0V5.33333H10.665C12.1379 5.33333 13.3317 4.13951 13.3317 2.66667C13.3317 1.19382 12.1379 0 10.665 0H7.99837Z",fill:"#FF7262"}),(0,n.jsx)("path",{d:"M2.665 2.66667C2.665 4.13951 3.85883 5.33333 5.33167 5.33333H7.99833V0H5.33167C3.85883 0 2.665 1.19382 2.665 2.66667Z",fill:"#F24E1E"}),(0,n.jsx)("path",{d:"M2.66504 7.99967C2.66504 9.47252 3.85886 10.6663 5.33171 10.6663H7.99837V5.33301H5.33171C3.85886 5.33301 2.66504 6.52683 2.66504 7.99967Z",fill:"#A259FF"})]}),s[3]=a):a=s[3],s[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_216_3161",children:(0,n.jsx)("rect",{width:"10.6667",height:"16",fill:"white",transform:"translate(2.665)"})})}),s[4]=l):l=s[4],s[5]!==t||s[6]!==r?(i=(0,n.jsxs)("svg",{"aria-label":"Figma logo",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,...r,children:[a,l]}),s[5]=t,s[6]=r,s[7]=i):i=s[7],i}try{a.displayName||(a.displayName="FigmaIcon")}catch{}},94195:(e,t,r)=>{r.d(t,{Gy:()=>c,LB:()=>f,nn:()=>h,lm:()=>m});var n=r(74848),o=r(96540);let a=null,l=null,i=new Set;function s(e){return i.add(e),a||(a=new ResizeObserver(()=>{l||(l=requestAnimationFrame(()=>{for(let e of(l=null,i))e()}))})).observe(document.documentElement),()=>{i.delete(e),0===i.size&&a&&(a.disconnect(),a=null)}}let c={small:1,medium:544,large:768,xlarge:1012,xxlarge:1280,xxxlarge:1350,xxxxlarge:1440},d=[c.xxxxlarge,c.xxxlarge,c.xxlarge,c.xlarge,c.large,c.medium,c.small],u=o.createContext({screenSize:c.small});function m(){return o.useContext(u)}function p(){return h(window.innerWidth)}function f({children:e,initialValue:t=c.small}){let r=(0,o.useSyncExternalStore)(s,p,(0,o.useCallback)(()=>t,[t])),a=(0,o.useMemo)(()=>({screenSize:r}),[r]);return(0,n.jsx)(u.Provider,{value:a,children:e})}function h(e){for(let t of d)if(e>=t)return t;return c.small}try{u.displayName||(u.displayName="ScreenContext")}catch{}try{f.displayName||(f.displayName="ScreenSizeProvider")}catch{}}}]); //# sourceMappingURL=packages_code-view-shared_hooks_use-repos-analytics_ts-packages_code-view-shared_hooks_use-tr-fbe81a-215f4c395978.js.map